#ifndef AUTOTHRESHOLD_H_ 
#define AUTOTHRESHOLD_H_

#include <vector>

using namespace std;

class AutoThreshold  
{
public:
	AutoThreshold();
	~AutoThreshold();
	int CalThreshold(vector<unsigned int> v, int H, int W, int F);
private:
	void GetUk(int k);
	void GetPiTable(vector<unsigned int> v);

	int Height;
	int Width;
	int Frames;

	double Pi[256];
	double u,uk0,uk1,wk0,wk1;
	double deltak[256];
};

#endif